package service;

import dao.customerDao;
import entity.customer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @program: crm
 * @description: Service实现层
 * @author:波
 * @create: 2020-05-18 15:08
 **/
@Service
public class customerServiceImpl implements customerService {
    @Autowired
    private customerDao customerDao;
    @Override
    public List<customer> getCustomers() {
        return customerDao.getCustomers();
    }

    @Override
    public List<customer> getCustmoersByName(String name) {
        return customerDao.getCustmoersByName(name);
    }

    @Override
    public int deleteCutomerById(Integer Id) {
        return customerDao.deleteCutomerById(Id);
    }

    @Override
    public int addCutomer(customer customer) {
        return customerDao.addCutomer(customer);
    }
}
